package com.example.ice.fittime.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.ice.fittime.entry.ExperienceShare;
import com.example.ice.fittime.entry.User;

import com.example.ice.fittime.entry.Banners;
import com.example.ice.fittime.entry.Sticker;
import com.example.ice.fittime.entry.UserDetail;
import com.example.ice.fittime.entry.StickerImage;
import com.example.ice.fittime.entry.UserImage;
import com.example.ice.fittime.entry.PraiseUser;
import com.example.ice.fittime.entry.CommentUser;
import com.example.ice.fittime.entry.UserActivity;


// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 *
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig experienceShareDaoConfig;
    private final DaoConfig userDaoConfig;
    private final DaoConfig bannersDaoConfig;
    private final DaoConfig userDetailDaoConfig;
    private final DaoConfig stickerImageDaoConfig;
    private final DaoConfig userImageDaoConfig;
    private final DaoConfig praiseUserDaoConfig;
    private final DaoConfig commentUserDaoConfig;
    private final DaoConfig userActivityDaoConfig;
    private final DaoConfig stickerDaoConfig;



    private final ExperienceShareDao experienceShareDao;
    private final UserDao userDao;
    private final BannersDao bannersDao;
    private final UserDetailDao userDetailDao;
    private final StickerImageDao stickerImageDao;
    private final UserImageDao userImageDao;
    private final PraiseUserDao praiseUserDao;
    private final CommentUserDao commentUserDao;
    private final UserActivityDao userActivityDao;
    private final StickerDao stickerDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        experienceShareDaoConfig = daoConfigMap.get(ExperienceShareDao.class).clone();
        experienceShareDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        stickerDaoConfig = daoConfigMap.get(StickerDao.class).clone();
        stickerDaoConfig.initIdentityScope(type);

        bannersDaoConfig = daoConfigMap.get(BannersDao.class).clone();
        bannersDaoConfig.initIdentityScope(type);

        userDetailDaoConfig = daoConfigMap.get(UserDetailDao.class).clone();
        userDetailDaoConfig.initIdentityScope(type);

        stickerImageDaoConfig = daoConfigMap.get(StickerImageDao.class).clone();
        stickerImageDaoConfig.initIdentityScope(type);

        userImageDaoConfig = daoConfigMap.get(UserImageDao.class).clone();
        userImageDaoConfig.initIdentityScope(type);

        praiseUserDaoConfig = daoConfigMap.get(PraiseUserDao.class).clone();
        praiseUserDaoConfig.initIdentityScope(type);

        commentUserDaoConfig = daoConfigMap.get(CommentUserDao.class).clone();
        commentUserDaoConfig.initIdentityScope(type);

        userActivityDaoConfig = daoConfigMap.get(UserActivityDao.class).clone();
        userActivityDaoConfig.initIdentityScope(type);


        experienceShareDao = new ExperienceShareDao(experienceShareDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);

        bannersDao = new BannersDao(bannersDaoConfig, this);
        userDetailDao = new UserDetailDao(userDetailDaoConfig, this);
        stickerImageDao = new StickerImageDao(stickerImageDaoConfig, this);
        userImageDao = new UserImageDao(userImageDaoConfig, this);
        praiseUserDao = new PraiseUserDao(praiseUserDaoConfig, this);
        commentUserDao = new CommentUserDao(commentUserDaoConfig, this);
        userActivityDao = new UserActivityDao(userActivityDaoConfig, this);
        stickerDao = new StickerDao(stickerDaoConfig, this);


        registerDao(ExperienceShare.class, experienceShareDao);
        registerDao(User.class, userDao);


        registerDao(Banners.class, bannersDao);
        registerDao(UserDetail.class, userDetailDao);
        registerDao(StickerImage.class, stickerImageDao);
        registerDao(UserImage.class, userImageDao);
        registerDao(PraiseUser.class, praiseUserDao);
        registerDao(CommentUser.class, commentUserDao);
        registerDao(UserActivity.class, userActivityDao);

        registerDao(Sticker.class, stickerDao);
    }

    public void clear() {
        experienceShareDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();

        bannersDaoConfig.clearIdentityScope();
        userDetailDaoConfig.clearIdentityScope();
        stickerImageDaoConfig.clearIdentityScope();
        userImageDaoConfig.clearIdentityScope();
        praiseUserDaoConfig.clearIdentityScope();
        commentUserDaoConfig.clearIdentityScope();
        userActivityDaoConfig.clearIdentityScope();
        stickerDaoConfig.clearIdentityScope();
    }

    public ExperienceShareDao getExperienceShareDao() {
        return experienceShareDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public BannersDao getBannersDao() {
        return bannersDao;
    }

    public UserDetailDao getUserDetailDao() {
        return userDetailDao;
    }

    public StickerImageDao getStickerImageDao() {
        return stickerImageDao;
    }

    public UserImageDao getUserImageDao() {
        return userImageDao;
    }

    public PraiseUserDao getPraiseUserDao() {
        return praiseUserDao;
    }

    public CommentUserDao getCommentUserDao() {
        return commentUserDao;
    }

    public UserActivityDao getUserActivityDao() {
        return userActivityDao;
    }

}
